package com.yld.scott.ch13;


@ScottController(age=2,name="wc")
public class Student {
	
	
	private String stuName;
	
	
	private int   age ;
	
	
	
	
	
	public void setAge(int age) {
		this.age = age;
	}

	/**
	 * 1: 在项目中不建议使用带参的构造方法  
	 * 2: 如果你一定要写  必须要写1个默认的构造方法
	 * ?  spring框架创建对象调用的是无参的构造方法
	 */
	public Student(){
		
	}
	
	public Student(String stuName, int age) {
		this.stuName = stuName;
		this.age = age;
	}






	public int add(int x , int y){
		
		return x + y;
	}
	
	public int add02(int x , Integer y){
		
		return x + y;
	}
	
	private int sub(int x , int y){
		
		return x - y;
	}

	@Override
	public String toString() {
		return "Student [stuName=" + stuName + ", age=" + age + "]";
	}
	
	
	
	

}
